Skip to content

Name what each class's instances are a pointer to - #124

Merged
estebanzimanyi merged 1 commit into
MobilityDB:masterfrom
estebanzimanyi:feat/class-ctype
Sep 3, 2026
Merged

Name what each class's instances are a pointer to#124
estebanzimanyi merged 1 commit into
MobilityDB:masterfrom
estebanzimanyi:feat/class-ctype

Conversation

@estebanzimanyi

Copy link
Copy Markdown
Member

A binding declares every wrapper in terms of the C type a class stands for, and
the catalog leaves that to the binding to work out — so each carries a map of
its own, and a class the model gains is one the binding cannot type until that
map is edited by hand. classes.<Class>.cType states it instead, over the 21 C
types MEOS's own signatures name.

It is read from those signatures rather than listed. A receiver-role method —
accessor, predicate, conversion, restriction, output — takes the value it is
called on first, so the pointee of that parameter names the type, and the
class's own methods answer for it. A class holding constructors alone says
nothing about itself that way: the concrete <leaf><subtype> classes take the
answer of the subtype they are a product of, TFloatInst reading TInstant
from tinstant_*, and any other class takes its parent's, which is the same C
type by construction. All 105 classes resolve one, and the nine the binding maps
by hand today — Temporal, TInstant, TSequence, TSequenceSet, Set,
Span, SpanSet, TBox, STBox — resolve to what that map says.

Three tests hold the three routes: the receiver, the subtype a constructor-only
class is a product of, and the parent a class with neither answers from.

Stacks on #123.

A binding declares every wrapper in terms of the C type a class stands for, and
the catalog leaves that to the binding to work out — so each carries a map of
its own, and a class the model gains is one the binding cannot type until that
map is edited by hand. `classes.<Class>.cType` states it instead, over the 21 C
types MEOS's own signatures name.

It is read from those signatures rather than listed. A receiver-role method —
accessor, predicate, conversion, restriction, output — takes the value it is
called on first, so the pointee of that parameter names the type, and the
class's own methods answer for it. A class holding constructors alone says
nothing about itself that way: the concrete `<leaf><subtype>` classes take the
answer of the subtype they are a product of, `TFloatInst` reading `TInstant`
from `tinstant_*`, and any other class takes its parent's, which is the same C
type by construction. All 105 classes resolve one, and the nine the binding maps
by hand today — `Temporal`, `TInstant`, `TSequence`, `TSequenceSet`, `Set`,
`Span`, `SpanSet`, `TBox`, `STBox` — resolve to what that map says.

Three tests hold the three routes: the receiver, the subtype a constructor-only
class is a product of, and the parent a class with neither answers from.
@estebanzimanyi
estebanzimanyi merged commit c5e65d3 into MobilityDB:master Sep 3, 2026
3 checks passed
@estebanzimanyi
estebanzimanyi deleted the feat/class-ctype branch September 3, 2026 00:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant